export class Training {
  id: string;
  name: string;
  desc: string;
  creater: string;
  createTime: number;
  inviteCode: string;
  className: string;
  classGuid: string; //不存在为匿名模式
  FK_PaperGuid: string;//默认关联威廉斯创造力测试
  state: boolean;
  isModify: boolean;
  studentNum:number;
  inviteCodeGuid:string;
  codeEnd:boolean;

  constructor(id: string, name: string, desc: string, creater: string, inviteCode: string, state,createTime, inviteCodeGuid=null,className = null, classGuid = null, FK_PaperGuid = null,codeEnd=true) {
    this.name = name;
    this.desc = desc;
    this.creater = creater;
    this.createTime = createTime;
    this.inviteCode = inviteCode;
    this.classGuid = classGuid;
    this.inviteCodeGuid=inviteCodeGuid;
    this.className = className;
    this.codeEnd=codeEnd;
    this.FK_PaperGuid = FK_PaperGuid ? FK_PaperGuid : '5c21329e-6ff1-4ea5-abbd-532b9c506ded';
    this.state = state;
    this.id = id;
    this.studentNum = 0;
  }
  updateTime(time){
    this.createTime = time;
  }
}
